package component;

import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;

import operation.TomcatManageFacadeElement;

public class TomcatManageLabelProvider implements ITableLabelProvider{

	@Override
	public void addListener(ILabelProviderListener listener) {
	}

	@Override
	public void dispose() {
	}

	@Override
	public boolean isLabelProperty(Object element, String property) {
		return false;
	}

	@Override
	public void removeListener(ILabelProviderListener listener) {
	}

	@Override
	public Image getColumnImage(Object element, int columnIndex) {
		return null;
	}

	@Override
	public String getColumnText(Object element, int columnIndex) {
		TomcatManageFacadeElement date = (TomcatManageFacadeElement)element;
		switch(columnIndex){
		case 0: return String.valueOf(columnIndex+1);
		case 1: return date.getPid();
		case 2: return date.getRunUser();
		case 3: return date.getPath();
		case 4: return date.getFileUser();
		case 5: return date.getFileGroup();
		case 6: return date.getStatus();
		default : 
		}
		return "-";
	}

}
